/*   1:    */ package gov.sat.tax.fwsk.common;
/*   2:    */ 
/*   3:    */ import java.io.IOException;
/*   4:    */ import java.io.PrintStream;
/*   5:    */ import java.io.UnsupportedEncodingException;
/*   6:    */ import javax.servlet.ServletConfig;
/*   7:    */ import javax.servlet.ServletException;
/*   8:    */ import javax.servlet.http.HttpServlet;
/*   9:    */ import javax.servlet.http.HttpServletRequest;
/*  10:    */ import javax.servlet.http.HttpServletResponse;
/*  11:    */ 
/*  12:    */ public class TransFormatServlet
/*  13:    */   extends HttpServlet
/*  14:    */ {
/*  15: 11 */   public static boolean NeedCov = true;
/*  16:    */   
/*  17:    */   public void doGet(HttpServletRequest request, HttpServletResponse response)
/*  18:    */     throws ServletException, IOException
/*  19:    */   {
/*  20: 20 */     performTask(request, response);
/*  21:    */   }
/*  22:    */   
/*  23:    */   public void doPost(HttpServletRequest request, HttpServletResponse response)
/*  24:    */     throws ServletException, IOException
/*  25:    */   {
/*  26: 31 */     performTask(request, response);
/*  27:    */   }
/*  28:    */   
/*  29:    */   public static String GBToUnicode(String strIn)
/*  30:    */   {
/*  31: 35 */     String strOut = null;
/*  32: 36 */     if ((strIn == null) || (strIn.trim().equals(""))) {
/*  33: 36 */       return strIn;
/*  34:    */     }
/*  35:    */     try
/*  36:    */     {
/*  37: 40 */       if (NeedCov) {
/*  38: 41 */         strOut = new String(strIn.getBytes(), "ISO8859_1");
/*  39:    */       } else {
/*  40: 43 */         strOut = strIn;
/*  41:    */       }
/*  42:    */     }
/*  43:    */     catch (Exception localException) {}
/*  44: 45 */     return strOut;
/*  45:    */   }
/*  46:    */   
/*  47:    */   public static boolean getBz()
/*  48:    */   {
/*  49: 53 */     return NeedCov;
/*  50:    */   }
/*  51:    */   
/*  52:    */   public String getServletInfo()
/*  53:    */   {
/*  54: 60 */     return super.getServletInfo();
/*  55:    */   }
/*  56:    */   
/*  57:    */   public void init(ServletConfig config)
/*  58:    */     throws ServletException
/*  59:    */   {
/*  60: 68 */     super.init(config);
/*  61: 69 */     String tmpBz = config.getInitParameter("CovBz");
/*  62: 70 */     if (tmpBz == null) {
/*  63: 70 */       tmpBz = "true";
/*  64:    */     }
/*  65: 71 */     NeedCov = tmpBz.equals("true");
/*  66: 72 */     System.out.println(NeedCov);
/*  67:    */   }
/*  68:    */   
/*  69:    */   public void performTask(HttpServletRequest request, HttpServletResponse response) {}
/*  70:    */   
/*  71:    */   public static String unicodeToGB(String strIn)
/*  72:    */   {
/*  73: 97 */     String strOut = null;
/*  74: 98 */     if ((strIn == null) || (strIn.trim().equals(""))) {
/*  75: 99 */       return strIn;
/*  76:    */     }
/*  77:    */     try
/*  78:    */     {
/*  79:104 */       if (NeedCov) {
/*  80:105 */         strOut = new String(strIn.getBytes("ISO8859_1"));
/*  81:    */       } else {
/*  82:107 */         strOut = strIn;
/*  83:    */       }
/*  84:    */     }
/*  85:    */     catch (UnsupportedEncodingException localUnsupportedEncodingException) {}
/*  86:109 */     return strOut;
/*  87:    */   }
/*  88:    */ }


/* Location:           D:\htjs\document\wsrz\WsrzEjbInf\
 * Qualified Name:     gov.sat.tax.fwsk.common.TransFormatServlet
 * JD-Core Version:    0.7.0.1
 */